 program NewSort;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  fin, fout: textfile;
  n, i, j, q: integer;
  a: array of integer;


begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength(a, n);
   for i:=1 to n do
    begin
      read(fin, a[i]);
    end;
   for j:= 1 to n do
      for i:=0 to n-j do
        if (a[i]>a[i+1]) then
        begin
          q:=a[i];
          a[i]:=a[i+1];
          a[i+1]:=q;
        end;
  assignfile(fout, 'output.txt');
  rewrite(fout);
    for i:=1 to n do
    begin
      write(fout, a[i], ' ');
    end;
    closefile(fout);
  end.
